import Vue from 'vue'
import Vuex from 'vuex'
import axios from 'axios'

import mavonEditor from 'mavon-editor'
import 'mavon-editor/dist/css/index.css'

//级联
// main.js
import EleMultiCascader from "ele-multi-cascader"
// 从2.2.5后不需要单独引用CSS
// import "ele-multi-cascader/dist/cascader.css"

Vue.use(EleMultiCascader);

// swiper css

import VueAwesomeSwiper from 'vue-awesome-swiper'

import 'swiper/dist/css/swiper.css'

// 图标css
import '@/assets/font/iconfont.css'

//markdown
import '@/assets/css/markdown.css'

// 饿了么组件
import ElementUI from 'element-ui'
import 'element-ui/lib/theme-chalk/index.css'


import videojs  from 'video.js'   //视频
import 'video.js/dist/video-js.css'


//防重点击
import preventReClick from './utils/preventReClick'

import '@/styles/public.scss' // global css
import E from 'wangeditor'

//新功能
import elCascaderMulti from "el-cascader-multi";
import eleMultiCascader from "ele-multi-cascader";
//import cascaderMulti from "cascader-multi";
// 拖拽组件

import './utils/directives'
import './utils/noteDrag'


import App from './App'
import router from './router'
import store from './store'

//引入jquery
import $ from 'jquery'

// Internationalization
import { loadStyle } from './utils/util'

// localstorage
import localstorage from './utils/localStorage'

//download
import downloadfile from './utils/downloadfile'

// import pdf from './utils/pdf'


// VueClipboard剪切板
import VueClipboard from 'vue-clipboard2'

import Clipboard from 'clipboard';

//自动获取焦点yx
import '@/utils/focus'

//登录控制
import '@/permission' // permission control

import global from '@/utils/global.js'
Vue.prototype.global = global




Vue.use(mavonEditor)
Vue.use(Vuex)
Vue.use(ElementUI)
Vue.use(VueAwesomeSwiper)
Vue.use(VueClipboard)
 Vue.use(elCascaderMulti)
 Vue.use(eleMultiCascader)
// Vue.use(pdf)
Vue.prototype.$http = axios
Vue.prototype.$localstorage = localstorage
Vue.prototype.$downloadfile = downloadfile
Vue.prototype.Clipboard = Clipboard


//全局设置弹窗时间，分页设置时间会
// Vue.prototype.$message = function (msg) {
//     console.log('222222')
//     if(!msg.duration){
//         console.log(0)
//         return ElementUI.Message({
//             message:msg.message,
//             type:msg.type,
//             duration:1000
//         })

//     }else{
//         console.log(1111110)
//         return ElementUI.Message({
//             message:msg.message,
//             type:msg.type,
//         })

//     }

// }
// Vue.prototype.$message.success = function (msg) {
//     console.log(msg,888)
//     return ElementUI.Message.success(msg)
// }
// Vue.prototype.$message.error = function (msg) {
//     console.log('4444')
// }
// Vue.prototype.$message.warning = function (msg) {
//     console.log('55855')
// }
// Vue.config.productionTip = false
// Vue.use(ElementUI, {
//     size: 'medium', // set element-ui default size
//     i18n: (key, value) => i18n.t(key, value)
// })

new Vue({
    router,
    store,
    render: h => h(App)
}).$mount('#jx-app')
